<?php
/*
 * Created on Dec 2, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
class MerchantDomain
{

	private $id;
	private $alias;
	private $headline;
	
	private $name;
	private $nameId;
	
	private $trackingURL;
	private $displayURL;
	
	private $simpleDomain;
	
	private $CSPhone;
	private $CSEmail;
	
	private $address;
	
	private $descript;
	
	private $isFeatured;
	
	private $status;
	
	private $createdTime;
	
	private $r_nameFirstLetter;
	
	private $oLogo;
	private $oThumbnail;
	
	private $r_couponCount;
	
	private $c_fontSize;
	
	private $oAttributes;
	
	public function MerchantDomain()
	{
	}
	
	public function setId($id)
	{
		$this->id = $id;
	}
	
	public function getId()
	{
		return $this->id;
	}
	
	public function setAlias($alias)
	{
		$this->alias = $alias;
	}
	
	public function getAlias()
	{
		return $this->alias;
	}
	
	public function setHeadline($headline)
	{
		$this->headline = $headline;
	}
	
	public function getHeadline()
	{
		return $this->headline;
	}
	
	public function setDescript($descript)
	{
		$this->descript = $descript;
	}
	
	public function getDescript()
	{
		return $this->descript;
	}
	
	public function setName($name)
	{
		$this->name = $name;
	}
	
	public function getName()
	{
		return $this->name;
	}
	
	public function setNameId($nameId)
	{
		$this->nameId = $nameId;
	}
	
	public function getNameId()
	{
		return $this->nameId;
	}
	
	public function setTrackingURL($trackingURL)
	{
		$this->trackingURL = $trackingURL;
	}
	
	public function getTrackingURL()
	{
		return $this->trackingURL;
	}
	
	public function setDisplayURL($displayURL)
	{
		$this->displayURL = $displayURL;
	}
	
	public function getDisplayURL()
	{
		return $this->displayURL;
	}
	
	public function setCSPhone($CSPhone)
	{
		$this->CSPhone = $CSPhone;
	}
	
	public function getCSPhone()
	{
		return $this->CSPhone;
	}
	
	public function setCSEmail($CSEmail)
	{
		$this->CSEmail = $CSEmail;
	}
	
	public function getCSEmail()
	{
		return $this->CSEmail;
	}
	
	public function setAddress($address)
	{
		$this->address = $address;
	}
	
	public function getAddress()
	{
		return $this->address;
	}
	
	public function setFeatured($isFeatured)
	{
		$this->isFeatured = $isFeatured;
	}
	
	public function getFeatured()
	{
		return $this->isFeatured;
	}

	public function getSimpleDomain()
	{
		$URL = str_ireplace('http:///', '', $this->displayURL);
		
		
		$arr 	= parse_url($URL, PHP_URL_HOST);
		$domain = strtolower($arr);
		
		$domain = str_ireplace('www.', '', $domain);
		
		return $domain;
	}
	
	public function setCreatedTime($createdTime)
	{
		$this->createdTime = $createdTime;
	}
	
	public function getCreatedTime()
	{
		return $this->createdTime;
	}
	
	public function setCouponCount($r_couponCount)
	{
		$this->r_couponCount = $r_couponCount;
	}
	
	public function getCouponCount()
	{
		return $this->r_couponCount;
	}

	public function setCfontSize($c_fontSize)
	{
		$this->c_fontSize = $c_fontSize;
	}
	
	public function getCfontSize()
	{
		return $this->c_fontSize;
	}

	public function setLogo($oLogo)
	{
		$this->oLogo = $oLogo;
	}
	
	public function getLogo()
	{
		return $this->oLogo;
	}
	
	public function setStatus($status)
	{
		$this->status = $status;
	}
	
	public function getStatus()
	{
		return $this->status;
	}
	
	public function setNameFirstLetter($r_nameFirstLetter)
	{
		$this->r_nameFirstLetter = $r_nameFirstLetter;
	}
	
	public function getNameFirstLetter()
	{
		return $this->r_nameFirstLetter;
	}
	
	
	public function setThumbnail($oThumbnail)
	{
		$this->oThumbnail = $oThumbnail;
	}
	
	public function getThumbnail()
	{
		return $this->oThumbnail;
	}
	
	public function containAttribute($sourceId, $attributeId)
	{
		$key = $sourceId . '_' . $attributeId;
		
		return array_key_exists($key, $this->oAttributes);
	}
	
	public function setAttributes($oAttributes)
	{
		$this->oAttributes = $oAttributes;
	}
	
	public function getAttributes()
	{
		return $this->oAttributes;
	}
	
	public function getAttribute($sourceId, $attributeId)
	{
		$key = $sourceId . '_' . $attributeId;
		
		return $this->oAttributes[$key];
	}
}
?>
